# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pymongo
_pkgname=pymongo
pkgver=3.10.1
pkgrel=2
pkgdesc='Python driver for MongoDB.'
url='https://pypi.org/project/pymongo/#files'
arch=('x86_64' 'aarch64')
license=('Apache')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5a73ac17ef6f6783a573facd90879dbefa0c95d69123bc67c1a6af0987cb5786f637b8fa81a6810387acc34829a4cde33b848ac0f7b08f7d07faa90a8e13b595')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

